home *** CD-ROM | disk | FTP | other *** search
/ Nejlepší České Hry / Nej české hry.iso / hry / vesmirna becherovka / 2004 Vesmírná Becherovka / Becherovka.exe / scripts / DefineSprite_932 / frame_1 / DoAction.as
Encoding:
Text File  |  2004-09-30  |  1.1 KB  |  48 lines

  1. function Speak(Osoba, SText, Orient, EngText, Driver)
  2. {
  3.    if(Orient == "R")
  4.    {
  5.       X = getProperty(Osoba, _X) + Osoba.hx * Osoba._xscale / 100;
  6.    }
  7.    else
  8.    {
  9.       X = getProperty(Osoba, _X) - Osoba.hx * Osoba._xscale / 100;
  10.    }
  11.    Y = getProperty(Osoba, _Y) + Osoba.hy * Osoba._yscale / 100;
  12.    if(!_root.menu.eng)
  13.    {
  14.       _root.s.bubble.Text = SText;
  15.    }
  16.    else
  17.    {
  18.       _root.s.bubble.Text = EngText;
  19.    }
  20.    _root.s.bubble.Count = 12 + length(SText);
  21.    _root.s.bubble.i = 1;
  22.    _root.s.bubble.Osoba = Osoba;
  23.    _root.s.bubble.Driver = Driver;
  24.    _root.s.bubble.Orient = Orient;
  25.    if(Orient == "R")
  26.    {
  27.       _root.s.bubble.gotoAndPlay(4);
  28.       setProperty("_root.s.bubble", _X, X + Osoba._width / 3);
  29.    }
  30.    if(Orient == "L")
  31.    {
  32.       _root.s.bubble.gotoAndPlay(2);
  33.       setProperty("_root.s.bubble", _X, X - Osoba._width / 3);
  34.    }
  35.    setProperty("_root.s.bubble", _Y, Y - 50 * Osoba._xscale / 100);
  36.    tellTarget(Osoba)
  37.    {
  38.       gotoAndStop("SpeakR");
  39.       play();
  40.    }
  41. }
  42. Boy.gotoAndStop(1);
  43. Susan.gotoAndStop(1);
  44. if(_root.menu.music)
  45. {
  46.    fscommand("exec","player.exe\t./music/sonata.mid");
  47. }
  48.